export const setDeliver=(province,shipid,cb)=>{
    $.ajax({
        type: "post",
        url: _deliverUrl,
        data: {
            province:province,
            shipid:shipid
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
}

export const addOrder=(shipid,gids,addid,cb)=>{
    $.ajax({
        type: "post",
        url: _addOrderUrl,
        data: {
            shipid:shipid,
            gids:gids,
            addid:addid
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
}



export const getOrderList=(status,page,cb)=>{
    $.ajax({
        type: "get",
        url: _getOrderList,
        data: {
            status:status,
            page:page
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
}
 
 export const getReviewList=(status,page,cb)=>{
    $.ajax({
        type: "get",
        url: _getReviewList,
        data: {
            status:status,
             page:page
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
}
export const review=(status,id,cb)=>{
    let url = status == 0 ?_review:_cancleReview; 
    $.ajax({
        type: "post",
        url:url,
        data: {
            orderid:id,
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
};

export const cancel=(id,cb)=>{
    $.ajax({
        type: "post",
        url:_cancel,
        data: {
            orderid:id,
        },
        dataType: "json",
        success: function (res) {
            cb(res);
        }
    });
};

 